<template v-loading="loading">
    <el-table class='table-child' :data="tableChild">
        <el-table-column label="" prop="" width="49"></el-table-column>
        <el-table-column label="分类">
            <template scope="scope">
                {{!scope.row.incrementName ? '--' : scope.row.incrementName}}
            </template>
        </el-table-column>
        <el-table-column label="订单量（条）">
            <template scope="scope">
                {{!scope.row.totalnum ? '--' : scope.row.totalnum}}
            </template>
        </el-table-column>
        <el-table-column label="销售额（元）" prop="totalmoney">
            <template scope="scope">
                {{!scope.row.totalmoney ? '--' : scope.row.totalmoney}}
            </template>
        </el-table-column>
    </el-table>
</template>
<script>
import { listCategoryBySchool } from 'api/serviceManage';
export default {
    data() {
        return {
            tableChild: [], // 子table集合
            loading: false
        };
    },
    props: {
        scope: Object
    },
    created() {
        this.btnChild(this.scope)
    },
    methods: {
        btnChild(val) {
            this.loading = true;
            listCategoryBySchool(val.row.schoolId, '').then(data => {
                this.loading = false;
                this.tableChild = data.data.content;
            }).catch(Error => {
                this.$message.error(Error);
                this.loading = false;
            })
        }
    }
};
</script>